/**
 *
 */
package com.magist.manage.enums;

import com.magist.core.enums.BaseEnum; import com.magist.core.util.TxtUtil;

/**
 * 合作状态
 */
public enum SupplyStatusEnum implements BaseEnum {

    SHANGXIAN("SHANGXIAN", "已上线"), NEIRONG("NEIRONG", "已提供内容"), QIANYUE("QIANYUE", "已签约"), YIXIANG("YIXIANG", "确认意向"),
    LIANXI("LIANXI", "联系上"), GEZHI("GEZHI", "已搁置"), XIAXIAN("XIAXIAN", "已下线"), FAIL("FAIL", "合作结束"), WAIT("WAIT", "待联系");

    private String code;

    private String desc;

    private SupplyStatusEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static SupplyStatusEnum getByCode(String code) {
        if (TxtUtil.isEmpty(code))
            return null;
        SupplyStatusEnum[] allEnums = SupplyStatusEnum.values();
        for (SupplyStatusEnum thisEnum : allEnums) {
            if (thisEnum.code.equals(code)) {
                return thisEnum;
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
